﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  
  <CustomAction
      Id="AG.SharePoint.Ribbon.FileExplorer"
      Location="CommandUI.Ribbon" RegistrationType="List" RegistrationId="101"
      HostWebDialog="TRUE" HostWebDialogHeight="170" HostWebDialogWidth="280">

    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Tabs._children">

          <Tab Id="AG.SharePoint.Ribbon.FileExplorer" Title="File Explorer" Description=""
               Sequence="1">
            <Scaling Id="AG.SharePoint.Ribbon.FileExplorer.Scaling">
              <MaxSize Id="AG.SharePoint.Ribbon.FileExplorer.Actions.MaxSize"
                       GroupId="AG.SharePoint.Ribbon.FileExplorer.Actions"
                       Size="OneRowLarge"/>
              <Scale Id="AG.SharePoint.Ribbon.FileExplorer.Actions.Scale"
                     GroupId="AG.SharePoint.Ribbon.FileExplorer.Actions"
                     Size="OneRowLarge" />
            </Scaling>
            <Groups Id="AG.SharePoint.Ribbon.FileExplorer.Groups">
              <Group
                Id="AG.SharePoint.Ribbon.FileExplorer.Actions"
                Description=""
                Title="Actions"
                Sequence="1"
                Template="Ribbon.Templates.OneRowLargeExample">
                <Controls Id="AG.SharePoint.Ribbon.FileExplorer.Actions.Controls">

                  <Button
                    Id="AG.SharePoint.Ribbon.FileExplorer.Copy"
                    Command="CopyFileFolder"
                    Sequence="1"
                    Image32by32=""
                    Image16by16=""
                    Description="multiple files or folders."
                    LabelText="Copy file/folder"
                    TemplateAlias="slot1"/>


                </Controls>
              </Group>
            </Groups>
          </Tab>
        </CommandUIDefinition>

        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.OneRowLargeExample">
            <Layout Title="OneRowLarge" LayoutTitle="OneRowLarge">
              <Section Alignment="Top" Type="OneRow">
                <Row>
                  <ControlRef DisplayMode="Large" TemplateAlias="slot1" />
                  <ControlRef DisplayMode="Large" TemplateAlias="slot2" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="CopyFileFolder"
                          CommandAction="~appWebUrl/Pages/CopyCustomAction.html?{StandardTokens}&amp;List={ListId}&amp;Selected={SelectedItemId}"/>

      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
    Id="AG.SharePoint.Ribbon.FileExplorer.OpenSPFE"
    Location="CommandUI.Ribbon" RegistrationType="List" RegistrationId="101">

    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="AG.SharePoint.Ribbon.FileExplorer.Actions.Controls._children">
                  <Button
                    Id="AG.SharePoint.Ribbon.FileExplorer.OpenFileExplorer"
                    Command="OpenFileExplorer"
                    Sequence="1"
                    Image32by32=""
                    Image16by16=""
                    Description="Open File Explorer."
                    LabelText="File Explorer"
                    TemplateAlias="slot2"/>

        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="OpenFileExplorer"
                          CommandAction="~appWebUrl/Pages/Default.aspx?{StandardTokens}&amp;List={ListId}"/>

      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>


  
</Elements>
